class ResponseBody {
  constructor() {}
  okWithData<T>(data: T) {
    return {
      status: 200,
      data,
      message: 'success',
    };
  }
  okWithPageData<T>(data: T, { totalSize, page, pageSize }) {
    return {
      status: 200,
      data: {
        data,
        totalSize,
        page,
        pageSize,
      },
      message: 'success',
    };
  }
}
export const responseBody = new ResponseBody();
